package com.qianyu.project.core.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianyu.project.core.bean.Flow;
import com.qianyu.project.vo.FlowVo;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author gs
 * @date create in 2020/12/11 17:04
 */
public interface IFlowService {
    /**
     * description: 根据模块查询流程 <br/>
     * author: gs   <br/>
     * date: 2020/12/12 <br/>
     * params: [moduleId] <br/>
     * return: com.qianyu.flow.core.pojo.Flow
     */
    Flow getByModule(@NotNull Integer moduleId);

    /**
     * description: 根据id查找流程 <br/>
     * author: gs   <br/>
     * date: 2021/1/4 <br/>
     * params: [flowId] <br/>
     * return: com.qianyu.project.core.bean.Flow
     */
    Flow getById(@NotNull Integer flowId);

    /**
     * description: 根据流程名查询流程 <br/>
     * author: gs   <br/>
     * date: 2021/1/10 <br/>
     * params: [flowName] <br/>
     * return: com.qianyu.project.core.bean.Flow
     */
    Flow getByName(String flowName);


    /*
     * description: 查询所有流程 <br/>
     * author: mfy   <br/>
     * date:  <br/>
     * params:  <br/>
     * return:
     */
    IPage<Flow> list(Map<String,String> param);

    /*
     * description: 添加一个审批流程  并添加节点 <br/>
     * author: mfy   <br/>
     * date:  <br/>
     * params:  <br/>
     * return: 
     */
    void save(FlowVo flowVo);

/*
 * description: 删除流程 <br/>
 * author: mfy   <br/>
 * date:  <br/>
 * params:  <br/>
 * return: 
 */
    void del(Integer flowId);
}
